package com.atguigu.qqzone.pojo;

import java.util.Date;
import java.util.List;

/**
 * @ClassName: Topic
 * @Description: 日志
 * @Author: wty
 * @Date: 2022/12/9
 */

public class Topic {
    private Integer id;
    private String title;
    private String content;
    private Date topicDate;
    /**
     * 日志和主人是n:1
     */
    private UserBasic author;

    /**
     * 1条日志具有多条回复 1:n
     */
    private List<Reply> replyList;

    public Topic() {
    }

    public Topic(Integer id, String title, String content, Date topicDate, UserBasic author) {
        this.id = id;
        this.title = title;
        this.content = content;
        this.topicDate = topicDate;
        this.author = author;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Date getTopicDate() {
        return topicDate;
    }

    public void setTopicDate(Date topicDate) {
        this.topicDate = topicDate;
    }

    public UserBasic getAuthor() {
        return author;
    }

    public void setAuthor(UserBasic author) {
        this.author = author;
    }

    @Override
    public String toString() {
        return "Topic{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", content='" + content + '\'' +
                ", topicDate=" + topicDate +
                ", author=" + author +
                '}';
    }
}
